package cn.gson.school.entity.jiuye;

import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonFormat;

import cn.gson.school.entity.xitong.ImageEntity;

/**
 * 多媒体表
 * 
 * @author 华少
 *
 */
@Entity
@Table(name = "tb_jy_multimedia")
public class MultimediaEntity {
	/**
	 * multimedia_id 多媒体编号 interview_id 面试记录id multimedia_video 面试资料 multimedia_type
	 * 面试资料类型 multimedia_time 时间
	 */
	@Id
	@Column(name = "multimedia_id")
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long multimediaId;

	@ManyToOne
	@JoinColumn(name = "interview_id")
	private InterviewRecordEntity interviewId;// 面试记录表

	@OneToOne
	@JoinColumn(name = "touxiang")
	private ImageEntity touXiang;

	@Column(name = "multimedia_type")
	private String multimediaType;

	@Column(name = "multimedia_time")
	@JsonFormat(pattern = "yyyy-MM-ddHH:mm:ss")
	private Date multimediaTime;

	public Long getMultimediaId() {
		return multimediaId;
	}

	public void setMultimediaId(Long multimediaId) {
		this.multimediaId = multimediaId;
	}

	public InterviewRecordEntity getInterviewId() {
		return interviewId;
	}

	public void setInterviewId(InterviewRecordEntity interviewId) {
		this.interviewId = interviewId;
	}

	public String getMultimediaType() {
		return multimediaType;
	}

	public void setMultimediaType(String multimediaType) {
		this.multimediaType = multimediaType;
	}

	public Date getMultimediaTime() {
		return multimediaTime;
	}

	public void setMultimediaTime(Date multimediaTime) {
		this.multimediaTime = multimediaTime;
	}

	public ImageEntity getTouXiang() {
		return touXiang;
	}

	public void setTouXiang(ImageEntity touXiang) {
		this.touXiang = touXiang;
	}

	@Override
	public String toString() {
		return "MultimediaEntity [multimediaId=" + multimediaId + ", interviewId=" + interviewId + ", touXiang="
				+ touXiang + ", multimediaType=" + multimediaType + ", multimediaTime=" + multimediaTime + "]";
	}

}
